<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>以 WBMP 格式将图像输出到浏览器或文件</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imagetypes.html">imagetypes</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imagewebp.html">imagewebp</a></div>
 <div class="up"><a href="ref.image.html">GD and Image 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.imagewbmp" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagewbmp</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PHP 5)</p><p class="refpurpose"><span class="refname">imagewbmp</span> &mdash; <span class="dc-title">以 WBMP 格式将图像输出到浏览器或文件</span></p>

 </div>
 <div class="refsect1 unknown-unknown-seealsq" id="refsect1-function.imagewbmp-unknown-unknown-seealsq">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>imagewbmp</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$image</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$foreground</code></span>
  ]] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>imagewbmp()</strong></span> 从
  <em><code class="parameter">image</code></em> 图像创建一个名为 <em><code class="parameter">filename</code></em> 的
  <acronym title="Wireless Bitmap">WBMP</acronym> 文件。<em><code class="parameter">image</code></em>
  参数是 <span class="function"><a href="function.imagecreatetruecolor.html" class="function">imagecreatetruecolor()</a></span> 的返回值。
  </p>
  <p class="para">
   <em><code class="parameter">filename</code></em> 参数是可选项，如果省略，则直接将原图像流输出。通过用
   <span class="function"><a href="function.header.html" class="function">header()</a></span> 发送 <acronym>image/vnd.wap.wbmp</acronym>
   的 Content-type，可以创建直接输出 WBMP 图像的 PHP 脚本。
   <blockquote class="note"><p><strong class="note">Note</strong>: 
    <p class="para">
     WBMP 支持仅能用于 PHP 编译时加入了 GD-1.8 或更高版本时。
    </p>
   </p></blockquote>
  </p>
  <p class="para">
   用可选的 <em><code class="parameter">foreground</code></em> 参数可以设定前景色，用
   <span class="function"><a href="function.imagecolorallocate.html" class="function">imagecolorallocate()</a></span> 函数返回的颜色标识符。默认前景色是黑色。
  </p>
  <p class="para">
   参见 <span class="function"><a href="function.image2wbmp.html" class="function">image2wbmp()</a></span>，<span class="function"><a href="function.imagepng.html" class="function">imagepng()</a></span>，<span class="function"><a href="function.imagegif.html" class="function">imagegif()</a></span>，<span class="function"><a href="function.imagejpeg.html" class="function">imagejpeg()</a></span>
   和 <span class="function"><a href="function.imagetypes.html" class="function">imagetypes()</a></span>。
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imagetypes.html">imagetypes</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imagewebp.html">imagewebp</a></div>
 <div class="up"><a href="ref.image.html">GD and Image 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
